package bairui.international.console.web.controller.branch.branch.staff;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.TB_BranchCompanyStaff;
import bairui.international.service.Service_BranchCompanyStaff;

/**
 *
 * 添加下级
 *
 * @generated
 * 
 * @see STest_C_BranchCompanyStaff_AddSub_Add 测试
 *
 */
@Controller
public class C_BranchCompanyStaff_AddSub_Add
 extends SC_BranchCompanyStaff_AddSub_Add 
{
	
	@Autowired private Service_BranchCompanyStaff service_BranchCompanyStaff;
	
	/**
	 * 添加
	 */
	@Action(Add.class)
	@GetMapping(Add.RequestMappingValue)
	public @FomatOutput @ResponseBody Object add(
		ModelMap map, HttpServletRequest request, 
		@PathVariable(name=Add.PathVariableName.BranchId) long branchId, 
		@PathVariable(name=Add.PathVariableName.Id) long id, 
		@PathVariable(name=Add.PathVariableName.NextId) long nextId
	) throws Exception {
		service_BranchCompanyStaff.addNext(id, new TB_BranchCompanyStaff(nextId));
		//
		return null;
	}
	

}
